//
//  ViewPageViewController.swift
//  CHSimpleUI
//
//  Created by cyptt on 2023/5/6.
//

import UIKit


class ViewPageViewController: UIViewController {

    lazy var viewPage = {()-> ScrollViewPage in
     
        let view:ScrollViewPage = ScrollViewPage()
       

        return view
    }()
    
    override func viewDidLoad() {
        super.viewDidLoad()

        self.view.backgroundColor = UIColor.white
        
        self.setUI()
    }
    
    
    
    
  
    func setUI(){
        self.view.addSubview(self.viewPage)
        
        let view1:UIView = Demo1TabView()
        view1.backgroundColor = UIColor.red
        
        let view2:UIView = DDDDTabView(controller: self)
        view2.backgroundColor = UIColor.yellow
        
        let view3:UIView = UIView()
        view3.backgroundColor = UIColor.yellow
        
        
        self.viewPage.setViews(views: [view1,view2,view3])

        self.viewPage.singleChioseView.setTitleArr(titleArr:  ["电子公章","电子私章","第三个"],defaultColor: UIColor.gray,selectedColor:  UIColor.red,lineColor: UIColor.red,lineH: 2)
        self.viewPage.singleChioseView.backgroundColor = UIColor.green
        
        self.viewPage.btnClickIndexBlockFun { index, title in
            
        }
//        self.viewPage.singleChioseView.btnClickIndexBlockFun { index, title in
//
//        }
        self.viewPage.snp.makeConstraints { make in
            make.width.equalToSuperview()
            make.bottom.equalTo(0)
            make.left.equalTo(0)
            make.top.equalTo(100)
        }
    }
    

}
